package com.gpjcjl.ui.fragment;

import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.gpjcjl.BaseActivity;
import com.gpjcjl.BaseFragment;
import com.gpjcjl.R;
import com.gpjcjl.entity.SettingProfile;

import butterknife.BindView;

/**
 * 报废原因
 */
public class SettingItem11 extends BaseActivity implements TextWatcher {

    @BindView(R.id.editText)
    EditText editText;

    @Override
    protected int getContentView() {
        return R.layout.fragment_item11;
    }

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        editText.setText(SettingProfile.getScrap());
        editText.addTextChangedListener(this);
    }

    @Override
    public void beforeTextChanged(CharSequence s, int start, int count, int after) {
    }

    @Override
    public void onTextChanged(CharSequence s, int start, int before, int count) {
    }

    @Override
    public void afterTextChanged(Editable s) {
        SettingProfile.setScrap(s != null ? s.toString() : null);
    }

}
